package com.kdzy.lshy.socity_server.controller;

import com.kdzy.lshy.socity_server.common.ResultMap;
import com.kdzy.lshy.socity_server.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.LinkedHashMap;

/**
 * 我的小组查询
 *  1.我的小组查询（工作量统计）
 *  2.我的小组查询（具体工作内容）
 *  3.我的小组详情（具体工作内容）
 *  4.办事结果更新
 *  5.工作端办事结果查询
 *  6.居民查询办事结果
 *
 * @author sjj
 */
@RestController
@CrossOrigin("*")
@RequestMapping("/")
public class MyTeamController {
    @Autowired
    private MyTeamService mtService;

    //我的小组查询（工作量统计）
    @RequestMapping(value = "/demandMyTeamWorkload", method = RequestMethod.POST)
    public Object demandMyTeamWorkload (String param, HttpServletRequest request){

        return mtService.demandMyTeamWorkload(param,request);

    }

    //我的小组查询（具体工作内容）
    @RequestMapping(value = "/demandMyTeam", method = RequestMethod.POST)
    public Object demandMyTeam (String param, HttpServletRequest request){

        return mtService.demandMyTeam(param,request);

    }

    //我的小组详情（具体工作内容）
    @RequestMapping(value = "/myTeamDetails", method = RequestMethod.POST)
    public Object myTeamDetails (String param, HttpServletRequest request){

        return mtService.myTeamDetails(param,request);
    }

    //办事结果更新
    @RequestMapping(value = "/workResultUpdate", method = RequestMethod.POST)
    public Object workResultUpdate(String param, HttpServletRequest request) {

        return mtService.update(param,request);
    }

    //工作端办事结果查询
    @RequestMapping(value = "/officerWorkResult", method = RequestMethod.POST)
    protected Object officerWorkResult(String param, HttpServletRequest request) {

        return mtService.officerWorkResult(param,request);
    }

    //居民查询办事结果
    @RequestMapping(value = "/dwellerWorkResult", method = RequestMethod.POST)
    protected Object dwellerWorkResult(String param, HttpServletRequest request) {

        return mtService.dwellerWorkResult(param,request);
    }
}
